import request from '@/utils/request'

/**
 * 分页查询
 *
 * @param app app
 * @param paginator paginator
 * @returns {*}
 */
export async function appConfigQuery(appConfig, paginator) {
  return await request({
    url: '/ddk/appConfig/query',
    method: 'post',
    data: {
      'appConfig': appConfig,
      'paginator': paginator
    }
  })
}

/**
 * 保存
 *
 * @param appConfig appConfig
 * @returns {*}
 */
export async function saveAppConfig(appConfig) {
  return await request({
    url: '/ddk/appConfig/save',
    method: 'post',
    data: appConfig
  })
}

/**
 * remoteValidateAppConfigName
 *
 * @param appConfigName appConfigName
 * @returns {*}
 */
export async function remoteValidateAppConfigName(appConfigName) {
  return await request({
    url: '/ddk/appConfig/validateAppConfigName/' + appConfigName,
    method: 'get'
  })
}
